/*
 * testConfig.c
 *
 *  Created on: 04/09/2011
 *      Author: utn_so
 */
#include "ConfigFile/config.h"
#include "Dictionary/Dictionary.h"
#include <stdlib.h>
#include <stdio.h>

int main()
{

	int i;
	char S[30];
	Dictionary D;
	Dictionary_Create(&D);
	Dictionary_Add(&D, "IP2", "123456789012");
	Dictionary_Add(&D, "directorio", "");
	Dictionary_Add(&D, "IP", "");
	Dictionary_Add(&D, "timeout", "");
	Dictionary_Add(&D, "port", "");

	if (CargarParametros("config.txt", &D) < 0)
		return 0;

	for (i = 0; i < D.Count; i++)
	{
		Dictionary_AtElement(&D, i, S);
		printf("%s\n", S);
	}

	Dictionary_Destroy(&D);

	return 0;
}
